900
|
How can I prevent a link to end to a specified bar
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutAllowLinkBars(VARIANT_TRUE);
var_Chart->PutLevelCount(2);
var_Chart->PutPaneWidth(VARIANT_FALSE,160);
var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Not-End-Linkable");
var_Items->AddBar(h,"Unknown",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,28,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarCanEndLink,VARIANT_FALSE);
var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,23,0,00,00).operator DATE(),COleDateTime(2005,6,27,0,00,00).operator DATE(),"",vtMissing);
var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,23,0,00,00).operator DATE(),COleDateTime(2005,6,27,0,00,00).operator DATE(),"",vtMissing);
spG2antt1->EndUpdate();
|
899
|
How can I prevent a link to start from a specified bar
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutAllowLinkBars(VARIANT_TRUE);
var_Chart->PutLevelCount(2);
var_Chart->PutPaneWidth(VARIANT_FALSE,160);
var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Not-Start-Linkable");
var_Items->AddBar(h,"Unknown",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,28,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarCanStartLink,VARIANT_FALSE);
var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,23,0,00,00).operator DATE(),COleDateTime(2005,6,27,0,00,00).operator DATE(),"",vtMissing);
var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,23,0,00,00).operator DATE(),COleDateTime(2005,6,27,0,00,00).operator DATE(),"",vtMissing);
spG2antt1->EndUpdate();
|
898
|
How can I prevent a specified bar to be linked
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutAllowLinkBars(VARIANT_TRUE);
var_Chart->PutLevelCount(2);
var_Chart->PutPaneWidth(VARIANT_FALSE,160);
var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Not-Linkable");
var_Items->AddBar(h,"Unknown",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,28,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->PutItemBar(h,"",EXG2ANTTLib::exBarCanBeLinked,VARIANT_FALSE);
var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2005,6,23,0,00,00).operator DATE(),COleDateTime(2005,6,27,0,00,00).operator DATE(),"",vtMissing);
var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2005,6,23,0,00,00).operator DATE(),COleDateTime(2005,6,27,0,00,00).operator DATE(),"",vtMissing);
spG2antt1->EndUpdate();
|
897
|
How can I display in the chart's header only days where the week starts

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutPaneWidth(VARIANT_FALSE,0);
var_Chart->PutFirstVisibleDate(COleDateTime(2009,1,31,0,00,00).operator DATE());
var_Chart->PutLevelCount(2);
var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0);
var_Level->PutLabel("<%mmmm%> <%yyyy%>");
var_Level->PutAlignment(EXG2ANTTLib::CenterAlignment);
var_Level->PutUnit(EXG2ANTTLib::exMonth);
EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1);
var_Level1->PutUnit(EXG2ANTTLib::exDay);
var_Level1->PutFormatLabel(L" (0:=weekday(dvalue)) = 1 ? '<b>' +value : '' ");
var_Chart->PutUnitWidth(23);
|
896
|
Is there any automatically way to display and change the bar's duration in the columns section

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
var_Columns->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Duration")));
var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(513));
var_Column->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutLevelCount(2);
var_Chart->PutFirstVisibleDate(COleDateTime(2009,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2009,1,2,0,00,00).operator DATE(),COleDateTime(2009,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2009,1,4,0,00,00).operator DATE(),COleDateTime(2009,1,9,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();
|
895
|
How can I programatically move or resize a bar using spin or slider controls in the columns

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
var_Columns->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")));
var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
var_Column->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")));
var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::SpinType);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutLevelCount(2);
var_Chart->PutShowEmptyBars(1);
var_Chart->PutFirstVisibleDate(COleDateTime(2009,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2009,1,2,0,00,00).operator DATE(),COleDateTime(2009,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2009,1,4,0,00,00).operator DATE(),COleDateTime(2009,1,9,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();
|
894
|
I am trying to call the ItemBar(exBarStart) after curent ending point, and the bar is not updated. What I am doing wrong
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutPaneWidth(VARIANT_FALSE,64);
var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,21,0,00,00).operator DATE());
var_Chart->PutShowEmptyBars(1);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Test");
var_Items->AddBar(h,"Task",COleDateTime(2005,6,22,0,00,00).operator DATE(),COleDateTime(2005,6,26,0,00,00).operator DATE(),"",vtMissing);
var_Items->AddBar(h,"Task",COleDateTime(2005,6,27,0,00,00).operator DATE(),var_Items->GetItemBar(h,"",EXG2ANTTLib::exBarEnd),vtMissing,vtMissing);
spG2antt1->EndUpdate();
|
893
|
How can change in the same time the starting and ending points of the bar
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutPaneWidth(VARIANT_FALSE,64);
var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,21,0,00,00).operator DATE());
var_Chart->PutShowEmptyBars(1);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Test");
var_Items->AddBar(h,"Task",COleDateTime(2005,6,22,0,00,00).operator DATE(),COleDateTime(2005,6,26,0,00,00).operator DATE(),vtMissing,vtMissing);
EXG2ANTTLib::IItemsPtr var_Items1 = spG2antt1->GetItems();
h = var_Items1->GetFirstVisibleItem();
var_Items1->AddBar(h,"Task",COleDateTime(2005,6,27,0,00,00).operator DATE(),COleDateTime(2005,6,29,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();
|
892
|
How can I control the exBarEffort property of the bar using slider controls

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
spG2antt1->PutOnResizeControl(EXG2ANTTLib::exResizeChart);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Tasks")))->PutAllowDragging(VARIANT_FALSE);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Histogram")));
var_Column->PutAllowDragging(VARIANT_FALSE);
var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
var_Column->PutPartialCheck(VARIANT_TRUE);
var_Column->PutAllowSizing(VARIANT_FALSE);
var_Column->PutWidth(18);
var_Column->PutLevelKey(long(1));
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Effort")));
var_Column1->PutLevelKey(long(1));
var_Column1->PutAllowDragging(VARIANT_FALSE);
var_Column1->PutAllowSizing(VARIANT_FALSE);
var_Column1->PutWidth(64);
var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(21));
EXG2ANTTLib::IEditorPtr var_Editor = var_Column1->GetEditor();
var_Editor->PutEditType(EXG2ANTTLib::SliderType);
var_Editor->PutOption(EXG2ANTTLib::exSliderWidth,long(-100));
var_Editor->PutOption(EXG2ANTTLib::exSliderMax,long(9));
var_Editor->PutOption(EXG2ANTTLib::exSliderMin,long(1));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutLevelCount(3);
var_Chart->PutNonworkingDays(0);
var_Chart->PutPaneWidth(VARIANT_FALSE,160);
var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE());
var_Chart->PutHistogramVisible(VARIANT_TRUE);
var_Chart->PutHistogramView(EXG2ANTTLib::HistogramViewEnum(0x10000 | EXG2ANTTLib::exHistogramNoGrouping | EXG2ANTTLib::exHistogramRecLeafItems | EXG2ANTTLib::exHistogramLeafItems | EXG2ANTTLib::exHistogramUnlockedItems | EXG2ANTTLib::exHistogramCheckedItems));
var_Chart->PutHistogramHeight(64);
EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->GetItem("Task");
var_Bar->PutHistogramCriticalColor(RGB(255,0,0));
var_Bar->PutHistogramPattern(EXG2ANTTLib::exBezierCurve);
var_Bar->PutHistogramType(EXG2ANTTLib::exHistOverAllocation);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Project 1");
var_Items->AddBar(h,"Summary",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,7,1,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->PutCellEditorVisible(h,long(2),EXG2ANTTLib::exEditorHidden);
var_Items->PutCellValue(h,long(2),"");
long h1 = var_Items->InsertItem(h,vtMissing,"Task 1");
var_Items->AddBar(h1,"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,28,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->PutCellMerge(h1,long(0),long(1));
var_Items->DefineSummaryBars(h,"",h1,"");
h1 = var_Items->InsertItem(h,vtMissing,"Task 2");
var_Items->AddBar(h1,"Task",COleDateTime(2005,6,23,0,00,00).operator DATE(),COleDateTime(2005,7,1,0,00,00).operator DATE(),"",vtMissing);
var_Items->PutCellMerge(h1,long(0),long(1));
var_Items->DefineSummaryBars(h,"",h1,"");
var_Items->PutItemBar(h1,"",EXG2ANTTLib::exBarEffort,long(5));
h1 = var_Items->InsertItem(h,vtMissing,"Task 3");
var_Items->AddBar(h1,"Task",COleDateTime(2005,6,25,0,00,00).operator DATE(),COleDateTime(2005,6,27,0,00,00).operator DATE(),"",vtMissing);
var_Items->PutCellMerge(h1,long(0),long(1));
var_Items->DefineSummaryBars(h,"",h1,"");
var_Items->PutExpandItem(h,VARIANT_TRUE);
var_Items->PutCellState(h,long(1),1);
h = var_Items->AddItem("Project 2");
var_Items->AddBar(h,"Summary",COleDateTime(2005,3,7,0,00,00).operator DATE(),COleDateTime(2005,7,12,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->PutCellEditorVisible(h,long(2),EXG2ANTTLib::exEditorHidden);
var_Items->PutCellValue(h,long(2),"");
h1 = var_Items->InsertItem(h,vtMissing,"Task 1");
var_Items->AddBar(h1,"Task",COleDateTime(2005,7,3,0,00,00).operator DATE(),COleDateTime(2005,7,8,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->PutCellMerge(h1,long(0),long(1));
var_Items->DefineSummaryBars(h,"",h1,"");
h1 = var_Items->InsertItem(h,vtMissing,"Task 2");
var_Items->AddBar(h1,"Task",COleDateTime(2005,7,5,0,00,00).operator DATE(),COleDateTime(2005,7,12,0,00,00).operator DATE(),"",vtMissing);
var_Items->PutCellMerge(h1,long(0),long(1));
var_Items->DefineSummaryBars(h,"",h1,"");
var_Items->PutItemBar(h1,"",EXG2ANTTLib::exBarEffort,long(5));
h1 = var_Items->InsertItem(h,vtMissing,"Task 3");
var_Items->AddBar(h1,"Task",COleDateTime(2005,7,7,0,00,00).operator DATE(),COleDateTime(2005,7,8,0,00,00).operator DATE(),"",vtMissing);
var_Items->PutCellMerge(h1,long(0),long(1));
var_Items->DefineSummaryBars(h,"",h1,"");
var_Items->PutExpandItem(h,VARIANT_TRUE);
var_Items->PutCellState(h,long(1),1);
spG2antt1->EndUpdate();
|
891
|
How can I determine if there is any Redo operation
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutAllowUndoRedo(VARIANT_TRUE);
var_Chart->PutLevelCount(2);
var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
VARIANT_BOOL var_CanRedo = spG2antt1->GetChart()->GetCanRedo();
|
890
|
How can I determine if there is any Undo operation
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutAllowUndoRedo(VARIANT_TRUE);
var_Chart->PutLevelCount(2);
var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
VARIANT_BOOL var_CanUndo = spG2antt1->GetChart()->GetCanUndo();
|
889
|
How can I turn on the Undo/Redo feature
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutAllowUndoRedo(VARIANT_TRUE);
var_Chart->PutLevelCount(2);
var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
|
888
|
How can I disable resizing the histogram at runtime
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->PutOnResizeControl(EXG2ANTTLib::exDisableHistogram);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
var_Chart->PutHistogramVisible(VARIANT_TRUE);
var_Chart->PutHistogramHeight(32);
var_Chart->GetBars()->GetItem("Task")->PutHistogramPattern(EXG2ANTTLib::exPatternBDiagonal);
spG2antt1->GetColumns()->Add(L"Column");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2001,1,3,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
|
887
|
How can I display automatically the start and end dates of the bars in the columns section

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
var_Columns->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")));
var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
var_Column->GetEditor()->PutEditType(EXG2ANTTLib::DateType);
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")));
var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::DateType);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
var_Chart->PutAllowLinkBars(VARIANT_TRUE);
var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar);
var_Chart->PutLevelCount(2);
var_Chart->PutPaneWidth(VARIANT_FALSE,196);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,24,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2006,9,22,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2006,9,23,0,00,00).operator DATE(),COleDateTime(2006,9,26,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();
|
886
|
How can I enable Undo/Redo support
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
spG2antt1->PutDrawGridLines(EXG2ANTTLib::exHLines);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
var_Columns->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")));
var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
var_Column->GetEditor()->PutEditType(EXG2ANTTLib::DateType);
var_Column->PutLevelKey(long(1));
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")));
var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::DateType);
var_Column1->PutLevelKey(long(1));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutDrawGridLines(EXG2ANTTLib::exHLines);
var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
var_Chart->PutAllowLinkBars(VARIANT_TRUE);
var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar);
var_Chart->PutLevelCount(2);
var_Chart->PutPaneWidth(VARIANT_FALSE,196);
var_Chart->PutAllowUndoRedo(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->PutAllowCellValueToItemBar(VARIANT_TRUE);
var_Items->AddBar(var_Items->AddItem("Task 1"),"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,24,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->AddBar(var_Items->AddItem("Task 2"),"Task",COleDateTime(2006,9,22,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->AddBar(var_Items->AddItem("Task 3"),"Task",COleDateTime(2006,9,23,0,00,00).operator DATE(),COleDateTime(2006,9,26,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();
|
885
|
Is there any option to update the bar's properties once the cell's value is changed ( associate the cell with bar )

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutDebug(VARIANT_TRUE);
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
var_Columns->Add(L"Tasks");
((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")))->GetEditor()->PutEditType(EXG2ANTTLib::DateType);
((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")))->GetEditor()->PutEditType(EXG2ANTTLib::DateType);
var_Columns->Add(L"Info");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
var_Chart->PutAllowLinkBars(VARIANT_FALSE);
var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar);
var_Chart->PutLevelCount(2);
var_Chart->PutPaneWidth(VARIANT_FALSE,224);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h1 = var_Items->InsertItem(vtMissing,vtMissing,"Task 1");
var_Items->AddBar(h1,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,23,0,00,00).operator DATE(),"A","Caption");
var_Items->PutItemBar(h1,"A",EXG2ANTTLib::exBarHAlignCaption,long(18));
var_Items->GetCellEditor(h1,long(3))->PutEditType(EXG2ANTTLib::EditType);
var_Items->CellValueToItemBar(h1,long(1),EXG2ANTTLib::exBarStart,"A");
var_Items->CellValueToItemBar(h1,long(2),EXG2ANTTLib::exBarEnd,"A");
var_Items->CellValueToItemBar(h1,long(3),EXG2ANTTLib::exBarCaption,"A");
long h2 = var_Items->InsertItem(vtMissing,vtMissing,"Task 2");
var_Items->AddBar(h2,"Task",COleDateTime(2006,9,22,0,00,00).operator DATE(),COleDateTime(2006,9,24,0,00,00).operator DATE(),"B",vtMissing);
EXG2ANTTLib::IEditorPtr var_Editor = var_Items->GetCellEditor(h2,long(3));
var_Editor->PutEditType(EXG2ANTTLib::SliderType);
var_Editor->PutOption(EXG2ANTTLib::exSliderWidth,long(-100));
var_Items->CellValueToItemBar(h2,long(1),EXG2ANTTLib::exBarStart,"B");
var_Items->CellValueToItemBar(h2,long(2),EXG2ANTTLib::exBarEnd,"B");
var_Items->CellValueToItemBar(h2,long(3),EXG2ANTTLib::exBarTransparent,"B");
long h3 = var_Items->InsertItem(vtMissing,vtMissing,"Task 3");
var_Items->AddBar(h3,"Task",COleDateTime(2006,9,23,0,00,00).operator DATE(),COleDateTime(2006,9,25,0,00,00).operator DATE(),"C",vtMissing);
EXG2ANTTLib::IEditorPtr var_Editor1 = var_Items->GetCellEditor(h3,long(3));
var_Editor1->PutEditType(EXG2ANTTLib::DropDownType);
var_Editor1->AddItem(0,L"Task",vtMissing);
var_Editor1->AddItem(1,L"Progress",vtMissing);
var_Editor1->AddItem(2,L"Project Summary",vtMissing);
var_Editor1->AddItem(2,L"Summary",vtMissing);
var_Items->CellValueToItemBar(h3,long(1),EXG2ANTTLib::exBarStart,"C");
var_Items->CellValueToItemBar(h3,long(2),EXG2ANTTLib::exBarEnd,"C");
var_Items->CellValueToItemBar(h3,long(3),EXG2ANTTLib::exBarName,"C");
spG2antt1->EndUpdate();
|
884
|
Is there any option to update the bar's properties once the cell's value is changed ( associate the column/cell with bars )

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
spG2antt1->PutIndent(11);
spG2antt1->PutHasLines(EXG2ANTTLib::exSolidLine);
spG2antt1->GetItems()->PutAllowCellValueToItemBar(VARIANT_TRUE);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
var_Columns->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Start")));
var_Column->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(1));
var_Column->GetEditor()->PutEditType(EXG2ANTTLib::DateType);
var_Column->PutLevelKey(long(1));
EXG2ANTTLib::IColumnPtr var_Column1 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"End")));
var_Column1->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(2));
var_Column1->GetEditor()->PutEditType(EXG2ANTTLib::DateType);
var_Column1->PutLevelKey(long(1));
EXG2ANTTLib::IColumnPtr var_Column2 = ((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Transparency")));
var_Column2->PutDef(EXG2ANTTLib::exCellValueToItemBarProperty,long(19));
EXG2ANTTLib::IEditorPtr var_Editor = var_Column2->GetEditor();
var_Editor->PutEditType(EXG2ANTTLib::SliderType);
var_Editor->PutOption(EXG2ANTTLib::exSliderWidth,long(-100));
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
var_Chart->PutAllowLinkBars(VARIANT_FALSE);
var_Chart->PutAllowCreateBar(EXG2ANTTLib::exNoCreateBar);
var_Chart->PutLevelCount(2);
var_Chart->PutPaneWidth(VARIANT_FALSE,224);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Project");
var_Items->AddBar(h,"Summary",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,10,3,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->PutCellEditorVisible(h,long(1),EXG2ANTTLib::exEditorHidden);
var_Items->PutCellEditorVisible(h,long(2),EXG2ANTTLib::exEditorHidden);
long h1 = var_Items->InsertItem(h,vtMissing,"Task 1");
var_Items->AddBar(h1,"Task",COleDateTime(2006,9,21,0,00,00).operator DATE(),COleDateTime(2006,9,24,0,00,00).operator DATE(),vtMissing,vtMissing);
long h2 = var_Items->InsertItem(h,vtMissing,"Task 2");
var_Items->AddBar(h2,"Task",COleDateTime(2006,9,24,0,00,00).operator DATE(),COleDateTime(2006,9,28,0,00,00).operator DATE(),vtMissing,vtMissing);
long h3 = var_Items->InsertItem(h,vtMissing,"Task 3");
var_Items->AddBar(h3,"Task",COleDateTime(2006,9,28,0,00,00).operator DATE(),COleDateTime(2006,10,3,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->DefineSummaryBars(h,"",h1,"");
var_Items->DefineSummaryBars(h,"",h2,"");
var_Items->DefineSummaryBars(h,"",h3,"");
var_Items->PutExpandItem(h,VARIANT_TRUE);
var_Items->PutItemBold(h,VARIANT_TRUE);
spG2antt1->EndUpdate();
|
883
|
How can I group two bars so I can specify the range or the limit of the interval between them

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
spG2antt1->PutOnResizeControl(EXG2ANTTLib::exResizeChart);
spG2antt1->GetColumns()->Add(L"Tasks");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Start")))->PutVisible(VARIANT_FALSE);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"End")))->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
var_Chart->PutPaneWidth(VARIANT_FALSE,64);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Project");
var_Items->PutCellValue(h,long(1),COleDateTime(2006,9,21,0,00,00).operator DATE());
var_Items->PutCellValue(h,long(2),COleDateTime(2006,10,3,0,00,00).operator DATE());
var_Items->AddBar(h,"Summary",var_Items->GetCellValue(h,long(1)),var_Items->GetCellValue(h,long(2)),"sum",vtMissing);
long h1 = var_Items->InsertItem(h,vtMissing,"Task 1");
var_Items->PutCellValue(h1,long(1),var_Items->GetCellValue(h,long(1)));
var_Items->PutCellValue(h1,long(2),COleDateTime(2006,9,24,0,00,00).operator DATE());
var_Items->AddBar(h1,"Task",var_Items->GetCellValue(h1,long(1)),var_Items->GetCellValue(h1,long(2)),"K1",vtMissing);
long h2 = var_Items->InsertItem(h,vtMissing,"Task 2");
var_Items->PutCellValue(h2,long(1),var_Items->GetCellValue(h1,long(2)));
var_Items->PutCellValue(h2,long(2),COleDateTime(2006,9,28,0,00,00).operator DATE());
var_Items->AddBar(h2,"Unknown",var_Items->GetCellValue(h2,long(1)),var_Items->GetCellValue(h2,long(2)),"K2",vtMissing);
var_Items->AddLink("L1",h1,"K1",h2,"K2");
long h3 = var_Items->InsertItem(h,vtMissing,"Task 3");
var_Items->PutCellValue(h3,long(1),var_Items->GetCellValue(h2,long(2)));
var_Items->PutCellValue(h3,long(2),var_Items->GetCellValue(h,long(2)));
var_Items->AddBar(h3,"Task",var_Items->GetCellValue(h3,long(1)),var_Items->GetCellValue(h3,long(2)),"K3",vtMissing);
var_Items->AddLink("L2",h2,"K2",h3,"K3");
var_Items->GroupBars(h1,"K1",VARIANT_FALSE,h2,"K2",VARIANT_TRUE,long(31),"0;4");
var_Items->GroupBars(h2,"K2",VARIANT_FALSE,h3,"K3",VARIANT_TRUE,long(31),"0;2");
var_Items->DefineSummaryBars(h,"sum",h1,"K1");
var_Items->DefineSummaryBars(h,"sum",h2,"K2");
var_Items->DefineSummaryBars(h,"sum",h3,"K3");
var_Items->PutExpandItem(h,VARIANT_TRUE);
var_Items->PutItemBold(h,VARIANT_TRUE);
spG2antt1->EndUpdate();
|
882
|
How can I group my bars so I can resize the interval between them but still keep the lengths of them

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
spG2antt1->PutOnResizeControl(EXG2ANTTLib::exResizeChart);
spG2antt1->GetColumns()->Add(L"Tasks");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Start")))->PutVisible(VARIANT_FALSE);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"End")))->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
var_Chart->PutPaneWidth(VARIANT_FALSE,64);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Project");
var_Items->PutCellValue(h,long(1),COleDateTime(2006,9,21,0,00,00).operator DATE());
var_Items->PutCellValue(h,long(2),COleDateTime(2006,10,3,0,00,00).operator DATE());
var_Items->AddBar(h,"Summary",var_Items->GetCellValue(h,long(1)),var_Items->GetCellValue(h,long(2)),vtMissing,vtMissing);
long h1 = var_Items->InsertItem(h,vtMissing,"Task 1");
var_Items->PutCellValue(h1,long(1),var_Items->GetCellValue(h,long(1)));
var_Items->PutCellValue(h1,long(2),COleDateTime(2006,9,24,0,00,00).operator DATE());
var_Items->AddBar(h1,"Task",var_Items->GetCellValue(h1,long(1)),var_Items->GetCellValue(h1,long(2)),vtMissing,vtMissing);
long h2 = var_Items->InsertItem(h,vtMissing,"Task 2");
var_Items->PutCellValue(h2,long(1),var_Items->GetCellValue(h1,long(2)));
var_Items->PutCellValue(h2,long(2),COleDateTime(2006,9,28,0,00,00).operator DATE());
var_Items->AddBar(h2,"Unknown",var_Items->GetCellValue(h2,long(1)),var_Items->GetCellValue(h2,long(2)),vtMissing,vtMissing);
var_Items->AddLink("L1",h1,"",h2,"");
long h3 = var_Items->InsertItem(h,vtMissing,"Task 3");
var_Items->PutCellValue(h3,long(1),var_Items->GetCellValue(h2,long(2)));
var_Items->PutCellValue(h3,long(2),var_Items->GetCellValue(h,long(2)));
var_Items->AddBar(h3,"Task",var_Items->GetCellValue(h3,long(1)),var_Items->GetCellValue(h3,long(2)),vtMissing,vtMissing);
var_Items->AddLink("L2",h2,"",h3,"");
var_Items->GroupBars(h1,"",VARIANT_FALSE,h2,"",VARIANT_TRUE,long(35),vtMissing);
var_Items->GroupBars(h2,"",VARIANT_FALSE,h3,"",VARIANT_TRUE,long(35),vtMissing);
var_Items->DefineSummaryBars(h,"",h1,"");
var_Items->DefineSummaryBars(h,"",h2,"");
var_Items->DefineSummaryBars(h,"",h3,"");
var_Items->PutExpandItem(h,VARIANT_TRUE);
var_Items->PutItemBold(h,VARIANT_TRUE);
spG2antt1->EndUpdate();
|
881
|
Can I group my bars so they move together when a bar inside changes, but still preserving the length of the bars

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
spG2antt1->PutOnResizeControl(EXG2ANTTLib::exResizeChart);
spG2antt1->GetColumns()->Add(L"Tasks");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Start")))->PutVisible(VARIANT_FALSE);
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"End")))->PutVisible(VARIANT_FALSE);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutFirstVisibleDate(COleDateTime(2006,9,20,0,00,00).operator DATE());
var_Chart->PutPaneWidth(VARIANT_FALSE,64);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Project");
var_Items->PutCellValue(h,long(1),COleDateTime(2006,9,21,0,00,00).operator DATE());
var_Items->PutCellValue(h,long(2),COleDateTime(2006,10,3,0,00,00).operator DATE());
var_Items->AddBar(h,"Summary",var_Items->GetCellValue(h,long(1)),var_Items->GetCellValue(h,long(2)),vtMissing,vtMissing);
long h1 = var_Items->InsertItem(h,vtMissing,"Task 1");
var_Items->PutCellValue(h1,long(1),var_Items->GetCellValue(h,long(1)));
var_Items->PutCellValue(h1,long(2),COleDateTime(2006,9,24,0,00,00).operator DATE());
var_Items->AddBar(h1,"Task",var_Items->GetCellValue(h1,long(1)),var_Items->GetCellValue(h1,long(2)),vtMissing,vtMissing);
long h2 = var_Items->InsertItem(h,vtMissing,"Task 2");
var_Items->PutCellValue(h2,long(1),var_Items->GetCellValue(h1,long(2)));
var_Items->PutCellValue(h2,long(2),COleDateTime(2006,9,28,0,00,00).operator DATE());
var_Items->AddBar(h2,"Unknown",var_Items->GetCellValue(h2,long(1)),var_Items->GetCellValue(h2,long(2)),vtMissing,vtMissing);
var_Items->AddLink("L1",h1,"",h2,"");
long h3 = var_Items->InsertItem(h,vtMissing,"Task 3");
var_Items->PutCellValue(h3,long(1),var_Items->GetCellValue(h2,long(2)));
var_Items->PutCellValue(h3,long(2),var_Items->GetCellValue(h,long(2)));
var_Items->AddBar(h3,"Task",var_Items->GetCellValue(h3,long(1)),var_Items->GetCellValue(h3,long(2)),vtMissing,vtMissing);
var_Items->AddLink("L2",h2,"",h3,"");
var_Items->GroupBars(h1,"",VARIANT_FALSE,h2,"",VARIANT_TRUE,long(3),vtMissing);
var_Items->GroupBars(h2,"",VARIANT_FALSE,h3,"",VARIANT_TRUE,long(3),vtMissing);
var_Items->DefineSummaryBars(h,"",h1,"");
var_Items->DefineSummaryBars(h,"",h2,"");
var_Items->DefineSummaryBars(h,"",h3,"");
var_Items->PutExpandItem(h,VARIANT_TRUE);
var_Items->PutItemBold(h,VARIANT_TRUE);
spG2antt1->EndUpdate();
|
880
|
How can I split the time scale, so a section displays days, while other displays weeks, and the other months

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutHeaderHeight(24);
spG2antt1->GetColumns()->Add(L"Default");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutDrawDateTicker(VARIANT_TRUE);
var_Chart->PutDrawGridLines(EXG2ANTTLib::exVLines);
var_Chart->PutNonworkingDays(0);
var_Chart->PutPaneWidth(VARIANT_FALSE,0);
var_Chart->PutFirstVisibleDate(COleDateTime(2007,1,1,0,00,00).operator DATE());
var_Chart->PutLevelCount(3);
EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0);
var_Level->PutLabel("<%yyyy%>");
var_Level->PutUnit(EXG2ANTTLib::exYear);
EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1);
var_Level1->PutAlignment(EXG2ANTTLib::CenterAlignment);
var_Level1->PutLabel("<%hy%>");
var_Level1->PutUnit(EXG2ANTTLib::exHalfYear);
var_Level1->PutReplaceLabel(L"1",L"<b>1/2</b>");
var_Level1->PutReplaceLabel(L"2",L"<b>2/2</b>");
EXG2ANTTLib::ILevelPtr var_Level2 = var_Chart->GetLevel(2);
var_Level2->PutLabel("<%mmm%>");
var_Level2->PutUnit(EXG2ANTTLib::exMonth);
var_Chart->PutUnitWidth(28);
var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
EXG2ANTTLib::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->GetDefaultInsideZoomFormat();
var_InsideZoomFormat->PutOwnerLabel(L"<b><%mmmm%></b> (weeks) ");
var_InsideZoomFormat->PutInsideLabel(L"<font ;6>W: <b><%ww%></b>");
var_InsideZoomFormat->PutInsideUnit(EXG2ANTTLib::exWeek);
EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms();
var_InsideZooms->PutSplitBaseLevel(VARIANT_FALSE);
EXG2ANTTLib::IInsideZoomPtr var_InsideZoom = var_InsideZooms->Add(COleDateTime(2007,1,1,0,00,00).operator DATE());
var_InsideZoom->PutAllowCustomFormat(VARIANT_TRUE);
EXG2ANTTLib::IInsideZoomFormatPtr var_InsideZoomFormat1 = var_InsideZoom->GetCustomFormat();
var_InsideZoomFormat1->PutOwnerLabel(L"<b><%mmmm%></b> (weeks) ");
var_InsideZoomFormat1->PutInsideLabel(L"<font ;6>W: <b><%ww%></b>");
var_InsideZoomFormat1->PutInsideUnit(EXG2ANTTLib::exWeek);
var_InsideZoomFormat1->PutBackColorChart(RGB(187,231,240));
EXG2ANTTLib::IInsideZoomPtr var_InsideZoom1 = var_InsideZooms->Add(COleDateTime(2007,3,1,0,00,00).operator DATE());
var_InsideZoom1->PutAllowCustomFormat(VARIANT_TRUE);
var_InsideZoom1->PutWidth(356);
EXG2ANTTLib::IInsideZoomFormatPtr var_InsideZoomFormat2 = var_InsideZoom1->GetCustomFormat();
var_InsideZoomFormat2->PutOwnerLabel(L"<b><%mmmm%></b> (days) ");
var_InsideZoomFormat2->PutInsideLabel(L"<font ;5><%d%></font>");
var_InsideZoomFormat2->PutInsideUnit(EXG2ANTTLib::exDay);
var_InsideZoomFormat2->PutBackColorChart(RGB(145,200,240));
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Task 1 ");
var_Items->AddBar(h,"Task",COleDateTime(2007,1,12,0,00,00).operator DATE(),COleDateTime(2007,3,9,0,00,00).operator DATE(),vtMissing,vtMissing);
h = var_Items->AddItem("Task 2");
var_Items->AddBar(h,"Task",COleDateTime(2007,1,25,0,00,00).operator DATE(),COleDateTime(2007,3,12,0,00,00).operator DATE(),vtMissing,vtMissing);
h = var_Items->AddItem("Task 3");
var_Items->AddBar(h,"Task",COleDateTime(2007,2,1,0,00,00).operator DATE(),COleDateTime(2007,2,8,0,00,00).operator DATE(),"B1",vtMissing);
var_Items->AddBar(h,"Task",COleDateTime(2007,2,8,0,00,00).operator DATE(),COleDateTime(2007,2,15,0,00,00).operator DATE(),"B2",vtMissing);
var_Items->AddBar(h,"Task",COleDateTime(2007,2,15,0,00,00).operator DATE(),COleDateTime(2007,2,22,0,00,00).operator DATE(),"B3",vtMissing);
var_Items->AddBar(h,"Task",COleDateTime(2007,2,22,0,00,00).operator DATE(),COleDateTime(2007,2,28,0,00,00).operator DATE(),"B4",vtMissing);
spG2antt1->EndUpdate();
|
879
|
How can I define a bar that shows two colors, one up and one down, without using skin or EBN files

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IBarPtr var_Bar = spG2antt1->GetChart()->GetBars()->Add(L"A");
var_Bar->PutColor(RGB(255,0,0));
var_Bar->PutShape(EXG2ANTTLib::exShapeSolidUp);
var_Bar->PutPattern(EXG2ANTTLib::exPatternSolid);
EXG2ANTTLib::IBarPtr var_Bar1 = spG2antt1->GetChart()->GetBars()->Add(L"B");
var_Bar1->PutColor(RGB(128,0,0));
var_Bar1->PutShape(EXG2ANTTLib::exShapeSolidDown);
var_Bar1->PutPattern(EXG2ANTTLib::exPatternSolid);
spG2antt1->GetChart()->GetBars()->Add(L"A%B")->PutShortcut(L"AB");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Task 1");
var_Items->AddBar(h,"AB",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,6,0,00,00).operator DATE(),"K1",vtMissing);
var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarPercent,long(1));
var_Items->PutItemBar(h,"K1",EXG2ANTTLib::exBarCanResizePercent,VARIANT_FALSE);
spG2antt1->EndUpdate();
|
878
|
Does your control support RightToLeft property for RTL languages or right to left
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutScrollBars(EXG2ANTTLib::exDisableBoth);
spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot);
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"P1")));
var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
var_Column->PutPartialCheck(VARIANT_TRUE);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Root");
var_Items->InsertItem(h,vtMissing,"Child 1");
var_Items->InsertItem(h,vtMissing,"Child 2");
var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->PutRightToLeft(VARIANT_TRUE);
spG2antt1->EndUpdate();
|
877
|
Is there any way to display the vertical scroll bar on the left side, as I want to align my data to the right
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutScrollBars(EXG2ANTTLib::exDisableBoth);
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
var_Columns->Add(L"C1");
var_Columns->Add(L"C2");
var_Columns->Add(L"C3");
var_Columns->Add(L"C4");
var_Columns->Add(L"C5");
var_Columns->Add(L"C6");
var_Columns->Add(L"C7");
var_Columns->Add(L"C8");
spG2antt1->PutRightToLeft(VARIANT_TRUE);
spG2antt1->EndUpdate();
|
876
|
Can I display the cell's check box after the text
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Column")));
var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
var_Column->PutDef(EXG2ANTTLib::exCellDrawPartsOrder,"caption,check");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->PutCellHasCheckBox(var_Items->AddItem("Caption 1"),long(0),VARIANT_TRUE);
var_Items->PutCellHasCheckBox(var_Items->AddItem("Caption 2"),long(0),VARIANT_TRUE);
|
875
|
Can I change the order of the parts in the cell, as checkbox after the text, and so on
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Column")))->PutDef(EXG2ANTTLib::exCellDrawPartsOrder,"caption,check,icon,icons,picture");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Text");
var_Items->PutCellImage(h,long(0),1);
var_Items->PutCellHasCheckBox(h,long(0),VARIANT_TRUE);
|
874
|
Can I have an image displayed after the text. Can I get that effect without using HTML content
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Column")))->PutDef(EXG2ANTTLib::exCellDrawPartsOrder,"caption,icon,check,icons,picture");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Text");
var_Items->PutCellImage(h,long(0),1);
|
873
|
My problem is that I want to mark the cells from every second item in the gant with a other backgroundcolor

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutPaneWidth(VARIANT_FALSE,0);
var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,17,0,00,00).operator DATE());
var_Chart->PutLevelCount(2);
var_Chart->PutUnitScale(EXG2ANTTLib::exSecond);
var_Chart->GetLevel(1)->PutFormatLabel(L"(0:=sec(dvalue)) mod 2 ? 0=: : '<bgcolor=00FF00>' + 0=:");
|
872
|
Is there any option to print the columns section on each page

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Col 1");
spG2antt1->GetColumns()->Add(L"Col 2");
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->GetChart()->PutLevelCount(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h1 = var_Items->AddItem("Col 1");
var_Items->PutCellValue(h1,long(1),"Col 2");
var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
long h2 = var_Items->AddItem("Col 1");
var_Items->PutCellValue(h2,long(1),"Col 2");
var_Items->AddBar(h2,"Task",COleDateTime(2001,2,5,0,00,00).operator DATE(),COleDateTime(2001,2,7,0,00,00).operator DATE(),"K2",vtMissing);
var_Items->AddLink("L1",h1,"K1",h2,"K2");
var_Items->PutLink("L1",EXG2ANTTLib::exLinkStartPos,long(0));
spG2antt1->EndUpdate();
/*
Includes the definition for CreateObject function like follows:
#include <comdef.h>
IUnknownPtr CreateObject( BSTR Object )
{
IUnknownPtr spResult;
spResult.CreateInstance( Object );
return spResult;
};
*/
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXPRINTLib' for the library: 'ExPrint 1.0 Control Library'
#import <ExPrint.dll>
using namespace EXPRINTLib;
*/
EXPRINTLib::IExPrintPtr var_Print = ::CreateObject(L"Exontrol.Print");
var_Print->PutOptions("ColumnsOnEveryPage=-2");
var_Print->PutPrintExt(((EXG2ANTTLib::IG2anttPtr)(spG2antt1)));
var_Print->Preview();
|
871
|
How can I add a different non-working area for different items

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Non-Work");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutFirstWeekDay(EXG2ANTTLib::exMonday);
var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,24,0,00,00).operator DATE());
var_Chart->PutPaneWidth(VARIANT_FALSE,52);
var_Chart->PutLevelCount(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("January");
var_Items->PutItemNonworkingUnits(h,VARIANT_FALSE,L"month(value) = 1");
h = var_Items->AddItem("February, Saturday, Sunday");
var_Items->PutItemNonworkingUnits(h,VARIANT_FALSE,L"month(value) = 2 or (weekday(value) = 0 or weekday(value) = 6)");
h = var_Items->AddItem("Sunday");
var_Items->PutItemNonworkingUnits(h,VARIANT_FALSE,L"weekday(value) = 0");
|
870
|
How can I define different non-working units for different items

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutPaneWidth(VARIANT_FALSE,78);
var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto);
var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE());
var_Chart->PutDrawLevelSeparator(EXG2ANTTLib::exLevelNoLine);
var_Chart->PutLevelCount(3);
var_Chart->GetLevel(1)->PutDrawGridLines(VARIANT_FALSE);
var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
var_Chart->PutDrawDateTicker(VARIANT_TRUE);
var_Chart->PutDateTickerLabel(L"<%mmm%> <%d%><br><b><%hh%>:<%nn%></b>");
var_Chart->PutMarkSelectDateColor(0x7ffff8ee);
EXG2ANTTLib::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->GetDefaultInsideZoomFormat();
var_InsideZoomFormat->PutOwnerLabel(L"<%mmm%> <%d%>");
var_InsideZoomFormat->PutBackColor(RGB(238,248,255));
var_InsideZoomFormat->PutBackColorChart(var_InsideZoomFormat->GetBackColor());
var_InsideZoomFormat->PutInsideCount(4);
var_InsideZoomFormat->PutInsideLabel(L"<b><%hh%></b>");
var_Chart->GetInsideZooms()->Add(COleDateTime(2005,6,22,0,00,00).operator DATE());
var_Chart->PutDrawGridLines(EXG2ANTTLib::exVLines);
var_Chart->GetBars()->GetItem("Split")->PutColor(RGB(255,0,0));
EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"Task:Split");
var_Bar->PutColor(RGB(255,0,0));
var_Bar->PutPattern(EXG2ANTTLib::exPatternBDiagonal);
var_Bar->PutShortcut(L"TaskS");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Project 1");
var_Items->AddBar(h,"Summary",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,7,1,0,00,00).operator DATE(),vtMissing,vtMissing);
long h1 = var_Items->InsertItem(h,vtMissing,"Task 1");
var_Items->AddBar(h1,"TaskS",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,28,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->PutItemNonworkingUnits(h1,VARIANT_FALSE,L"weekday(value)=1 or weekday(value)=2");
var_Items->PutItemNonworkingUnits(h1,VARIANT_TRUE,L"weekday(value)=1 or weekday(value)=2 or (hour(value)<8 or hour(value)>=16 )");
var_Items->DefineSummaryBars(h,"",h1,"");
h1 = var_Items->InsertItem(h,vtMissing,"Task 2");
var_Items->AddBar(h1,"TaskS",COleDateTime(2005,6,22,4,00,00).operator DATE(),COleDateTime(2005,7,1,0,00,00).operator DATE(),"E",vtMissing);
var_Items->PutItemNonworkingUnits(h1,VARIANT_FALSE,L"weekday(value)=0");
var_Items->PutItemNonworkingUnits(h1,VARIANT_TRUE,L"weekday(value)=0 or hour(value)<4 or hour(value)>19");
var_Items->DefineSummaryBars(h,"",h1,"E");
var_Items->PutItemBar(h1,"E",EXG2ANTTLib::exBarEffort,long(5));
h1 = var_Items->InsertItem(h,vtMissing,"Task 3");
var_Items->AddBar(h1,"TaskS",COleDateTime(2005,6,22,12,00,00).operator DATE(),COleDateTime(2005,6,27,0,00,00).operator DATE(),"E",vtMissing);
var_Items->PutItemNonworkingUnits(h1,VARIANT_FALSE,L"weekday(value)=1 or weekday(value)=2");
var_Items->PutItemNonworkingUnits(h1,VARIANT_TRUE,L"weekday(value)=1 or weekday(value)=2 or (hour(value)<8 or hour(value)>=16 )");
var_Items->DefineSummaryBars(h,"",h1,"E");
var_Items->PutExpandItem(h,VARIANT_TRUE);
h = var_Items->AddItem("Project 2");
var_Items->AddBar(h,"Summary",COleDateTime(2005,6,26,0,00,00).operator DATE(),COleDateTime(2005,7,6,0,00,00).operator DATE(),vtMissing,vtMissing);
h1 = var_Items->InsertItem(h,vtMissing,"TaskS 1");
var_Items->AddBar(h1,"TaskS",COleDateTime(2005,6,26,0,00,00).operator DATE(),COleDateTime(2005,7,2,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->DefineSummaryBars(h,"",h1,"");
h1 = var_Items->InsertItem(h,vtMissing,"TaskS 2");
var_Items->AddBar(h1,"TaskS",COleDateTime(2005,6,28,0,00,00).operator DATE(),COleDateTime(2005,7,6,0,00,00).operator DATE(),"E",vtMissing);
var_Items->DefineSummaryBars(h,"",h1,"E");
var_Items->PutItemBar(h1,"E",EXG2ANTTLib::exBarEffort,long(5));
h1 = var_Items->InsertItem(h,vtMissing,"TaskS 3");
var_Items->AddBar(h1,"TaskS",COleDateTime(2005,6,30,0,00,00).operator DATE(),COleDateTime(2005,7,2,0,00,00).operator DATE(),"E",vtMissing);
var_Items->DefineSummaryBars(h,"",h1,"E");
var_Items->PutExpandItem(h,VARIANT_TRUE);
spG2antt1->EndUpdate();
|
869
|
I want to define/highlight for specified dates as being non-working. Is this possible

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Items");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutNonworkingDaysColor(RGB(255,0,0));
var_Chart->PutPaneWidth(VARIANT_FALSE,48);
ULong c = var_Chart->GetNonworkingDaysColor();
EXG2ANTTLib::PatternEnum p = var_Chart->GetNonworkingDaysPattern();
var_Chart->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IBarPtr var_Bar = var_Chart->GetBars()->Add(L"NW");
var_Bar->PutColor(c);
var_Bar->PutPattern(p);
var_Bar->PutHeight(-1);
var_Bar->PutShape(EXG2ANTTLib::exShapeSolidFrameless);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Item 1");
var_Items->AddBar(h,"NW",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,3,0,00,00).operator DATE(),"0",vtMissing);
var_Items->PutItemBar(h,"0",EXG2ANTTLib::exBarSelectable,VARIANT_FALSE);
var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K2",vtMissing);
h = var_Items->AddItem("Item 2");
var_Items->AddBar(h,"NW",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"0",vtMissing);
var_Items->PutItemBar(h,"0",EXG2ANTTLib::exBarSelectable,VARIANT_FALSE);
var_Items->AddBar(h,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,5,0,00,00).operator DATE(),"K2",vtMissing);
spG2antt1->EndUpdate();
|
868
|
Do you have any sample how can I programmatically magnify a single date, so can show the hours, while the rest of the chart displays days

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->PutMarkSearchColumn(VARIANT_FALSE);
spG2antt1->PutShowFocusRect(VARIANT_FALSE);
spG2antt1->GetColumns()->Add(L"Tasks");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"C")));
var_Column->PutHeaderAlignment(EXG2ANTTLib::CenterAlignment);
var_Column->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE);
var_Column->PutPartialCheck(VARIANT_TRUE);
var_Column->PutAllowSizing(VARIANT_FALSE);
var_Column->PutWidth(18);
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutPaneWidth(VARIANT_FALSE,96);
var_Chart->PutAllowCreateBar(EXG2ANTTLib::exCreateBarAuto);
var_Chart->PutFirstVisibleDate(COleDateTime(2005,6,20,0,00,00).operator DATE());
var_Chart->PutDrawLevelSeparator(EXG2ANTTLib::exLevelNoLine);
var_Chart->PutLevelCount(3);
var_Chart->GetLevel(1)->PutDrawGridLines(VARIANT_FALSE);
var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
var_Chart->PutDrawDateTicker(VARIANT_TRUE);
var_Chart->PutDateTickerLabel(L"<%mmm%> <%d%><br><b><%hh%>:<%nn%></b>");
var_Chart->PutMarkSelectDateColor(0x7ffff8ee);
EXG2ANTTLib::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->GetDefaultInsideZoomFormat();
var_InsideZoomFormat->PutOwnerLabel(L"<%mmm%> <%d%>");
var_InsideZoomFormat->PutBackColor(RGB(238,248,255));
var_InsideZoomFormat->PutBackColorChart(var_InsideZoomFormat->GetBackColor());
var_InsideZoomFormat->PutInsideCount(4);
var_InsideZoomFormat->PutInsideLabel(L"<b><%hh%></b>");
var_Chart->GetInsideZooms()->Add(COleDateTime(2005,6,22,0,00,00).operator DATE());
var_Chart->PutDrawGridLines(EXG2ANTTLib::exVLines);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Project 1");
var_Items->AddBar(h,"Summary",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,7,1,0,00,00).operator DATE(),vtMissing,vtMissing);
long h1 = var_Items->InsertItem(h,vtMissing,"Task 1");
var_Items->AddBar(h1,"Task",COleDateTime(2005,6,21,0,00,00).operator DATE(),COleDateTime(2005,6,28,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->PutCellMerge(h1,long(0),long(1));
var_Items->DefineSummaryBars(h,"",h1,"");
h1 = var_Items->InsertItem(h,vtMissing,"Task 2");
var_Items->AddBar(h1,"Task",COleDateTime(2005,6,23,0,00,00).operator DATE(),COleDateTime(2005,7,1,0,00,00).operator DATE(),"E",vtMissing);
var_Items->PutCellMerge(h1,long(0),long(1));
var_Items->DefineSummaryBars(h,"",h1,"E");
var_Items->PutItemBar(h1,"E",EXG2ANTTLib::exBarEffort,long(5));
h1 = var_Items->InsertItem(h,vtMissing,"Task 3");
var_Items->AddBar(h1,"Task",COleDateTime(2005,6,25,0,00,00).operator DATE(),COleDateTime(2005,6,27,0,00,00).operator DATE(),"E",vtMissing);
var_Items->PutCellMerge(h1,long(0),long(1));
var_Items->DefineSummaryBars(h,"",h1,"E");
var_Items->PutExpandItem(h,VARIANT_TRUE);
var_Items->PutCellState(h,long(1),1);
h = var_Items->AddItem("Project 2");
var_Items->AddBar(h,"Summary",COleDateTime(2005,6,26,0,00,00).operator DATE(),COleDateTime(2005,7,6,0,00,00).operator DATE(),vtMissing,vtMissing);
h1 = var_Items->InsertItem(h,vtMissing,"Task 1");
var_Items->AddBar(h1,"Task",COleDateTime(2005,6,26,0,00,00).operator DATE(),COleDateTime(2005,7,2,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->PutCellMerge(h1,long(0),long(1));
var_Items->DefineSummaryBars(h,"",h1,"");
h1 = var_Items->InsertItem(h,vtMissing,"Task 2");
var_Items->AddBar(h1,"Task",COleDateTime(2005,6,28,0,00,00).operator DATE(),COleDateTime(2005,7,6,0,00,00).operator DATE(),"E",vtMissing);
var_Items->PutCellMerge(h1,long(0),long(1));
var_Items->DefineSummaryBars(h,"",h1,"E");
var_Items->PutItemBar(h1,"E",EXG2ANTTLib::exBarEffort,long(5));
h1 = var_Items->InsertItem(h,vtMissing,"Task 3");
var_Items->AddBar(h1,"Task",COleDateTime(2005,6,30,0,00,00).operator DATE(),COleDateTime(2005,7,2,0,00,00).operator DATE(),"E",vtMissing);
var_Items->PutCellMerge(h1,long(0),long(1));
var_Items->DefineSummaryBars(h,"",h1,"E");
var_Items->PutExpandItem(h,VARIANT_TRUE);
var_Items->PutCellState(h,long(1),1);
spG2antt1->EndUpdate();
|
867
|
How can I define my own/custom labels and subdivisions

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutToolTip(L"");
var_Chart->PutPaneWidth(VARIANT_FALSE,0);
var_Chart->PutScrollRange(EXG2ANTTLib::exStartDate,long(0));
var_Chart->PutScrollRange(EXG2ANTTLib::exEndDate,long(110));
var_Chart->PutFirstVisibleDate(long(0));
var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
var_Chart->PutMarkTodayColor(var_Chart->GetBackColor());
var_Chart->PutLevelCount(3);
EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0);
var_Level->PutToolTip("");
var_Level->PutAlignment(EXG2ANTTLib::CenterAlignment);
var_Level->PutUnit(EXG2ANTTLib::exDay);
var_Level->PutCount(16);
var_Level->PutFormatLabel(L"'Group <b>'+int(1 +dvalue/16)");
EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1);
var_Level1->PutToolTip("");
var_Level1->PutAlignment(EXG2ANTTLib::CenterAlignment);
var_Level1->PutUnit(EXG2ANTTLib::exDay);
var_Level1->PutCount(4);
var_Level1->PutFormatLabel(L" (abs(dvalue)/4) mod 4");
var_Level1->PutReplaceLabel(L"0",L"Sub-Group <b>1</b>");
var_Level1->PutReplaceLabel(L"1",L"Sub-Group <b>2</b>");
var_Level1->PutReplaceLabel(L"2",L"Sub-Group <b>3</b>");
var_Level1->PutReplaceLabel(L"3",L"Sub-Group <b>4</b>");
EXG2ANTTLib::ILevelPtr var_Level2 = var_Chart->GetLevel(2);
var_Level2->PutToolTip("");
var_Level2->PutUnit(EXG2ANTTLib::exDay);
var_Level2->PutCount(1);
var_Level2->PutFormatLabel(L"(abs(dvalue) mod 4)");
var_Level2->PutReplaceLabel(L"0",L"A");
var_Level2->PutReplaceLabel(L"1",L"B");
var_Level2->PutReplaceLabel(L"2",L"C");
var_Level2->PutReplaceLabel(L"3",L"D");
spG2antt1->EndUpdate();
|
866
|
I want to mark or highlight the last Friday of the month. Is there any option to do that

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutPaneWidth(VARIANT_FALSE,0);
var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,17,0,00,00).operator DATE());
var_Chart->PutLevelCount(2);
var_Chart->GetLevel(1)->PutFormatLabel(L"(weekday(dvalue)=5 ? month(dvalue+7)!=month(dvalue) ? '<b><bgcolor=000000><fgcolor=FFFFFF>' ) + value");
|
865
|
I use the SelectDate method but the dates are not being highligted. What can I do
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
var_Chart->PutMarkTodayColor(var_Chart->GetBackColor());
var_Chart->PutLevelCount(2);
var_Chart->PutSelectLevel(1);
var_Chart->PutSelectDate(COleDateTime(2008,1,2,0,00,00).operator DATE(),VARIANT_TRUE);
spG2antt1->EndUpdate();
|
864
|
Can I use ebn files to display the selected dates

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IAppearancePtr var_Appearance = spG2antt1->GetVisualAppearance();
var_Appearance->Add(2,"c:\\exontrol\\images\\normal.ebn");
var_Appearance->Add(1,"CP:2 0 -4 0 4");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
var_Chart->PutMarkTodayColor(var_Chart->GetBackColor());
var_Chart->PutLevelCount(2);
var_Chart->PutMarkSelectDateColor(0x1000000);
var_Chart->PutSelectLevel(1);
var_Chart->PutSelectDate(COleDateTime(2008,1,3,0,00,00).operator DATE(),VARIANT_TRUE);
var_Chart->PutSelectDate(COleDateTime(2008,1,4,0,00,00).operator DATE(),VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Default");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2008,1,2,0,00,00).operator DATE(),COleDateTime(2008,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2008,1,3,0,00,00).operator DATE(),COleDateTime(2008,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->AddBar(var_Items->AddItem("Item 3"),"Task",COleDateTime(2008,1,4,0,00,00).operator DATE(),COleDateTime(2008,1,8,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->AddBar(var_Items->AddItem("Item 4"),"Task",COleDateTime(2008,1,5,0,00,00).operator DATE(),COleDateTime(2008,1,9,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();
|
863
|
Can I use ebn files to display the selected dates

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
var_Chart->PutMarkTodayColor(var_Chart->GetBackColor());
var_Chart->PutLevelCount(2);
var_Chart->PutMarkSelectDateColor(0x1000000);
var_Chart->PutSelectLevel(1);
var_Chart->PutSelectDate(COleDateTime(2008,1,3,0,00,00).operator DATE(),VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Default");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddBar(var_Items->AddItem("Item 1"),"Task",COleDateTime(2008,1,2,0,00,00).operator DATE(),COleDateTime(2008,1,6,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->AddBar(var_Items->AddItem("Item 2"),"Task",COleDateTime(2008,1,3,0,00,00).operator DATE(),COleDateTime(2008,1,7,0,00,00).operator DATE(),vtMissing,vtMissing);
var_Items->AddBar(var_Items->AddItem("Item 3"),"Task",COleDateTime(2008,1,4,0,00,00).operator DATE(),COleDateTime(2008,1,8,0,00,00).operator DATE(),vtMissing,vtMissing);
spG2antt1->EndUpdate();
|
862
|
How can I change the color for selected dates to be solid

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutPaneWidth(VARIANT_FALSE,0);
var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
var_Chart->PutMarkTodayColor(var_Chart->GetBackColor());
var_Chart->PutLevelCount(2);
var_Chart->PutMarkSelectDateColor(0x7fff0000);
var_Chart->PutSelectLevel(1);
var_Chart->PutSelectDate(COleDateTime(2008,1,15,0,00,00).operator DATE(),VARIANT_TRUE);
var_Chart->PutSelectDate(COleDateTime(2008,1,16,0,00,00).operator DATE(),VARIANT_TRUE);
spG2antt1->EndUpdate();
|
861
|
How can I disable selecting dates when I click the chart's header
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetChart()->PutAllowSelectDate(EXG2ANTTLib::exNoSelectDate);
|
860
|
Is there any option to specify which dates can be magnified or resized
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutLevelCount(2);
var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
var_Chart->PutShowNonworkingDates(VARIANT_TRUE);
var_Chart->PutCondInsideZoom(L"not(weekday(value) = 0 or weekday(value) = 6)");
spG2antt1->EndUpdate();
|
859
|
How can I change the width for a specified date time unit

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutLevelCount(2);
var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
var_Chart->PutAllowResizeInsideZoom(VARIANT_FALSE);
var_Chart->PutInsideZoomOnDblClick(VARIANT_FALSE);
EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms();
EXG2ANTTLib::IInsideZoomPtr var_InsideZoom = var_InsideZooms->Add(COleDateTime(2008,1,4,0,00,00).operator DATE());
var_InsideZoom->PutWidth(32);
var_InsideZoom->PutAllowInsideFormat(VARIANT_FALSE);
spG2antt1->EndUpdate();
|
858
|
How can I disable the control's splitter so the user can't resize the list area
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->PutOnResizeControl(EXG2ANTTLib::OnResizeControlEnum(EXG2ANTTLib::exDisableSplitter | EXG2ANTTLib::exResizeChart));
spG2antt1->GetChart()->PutPaneWidth(VARIANT_FALSE,60);
|
857
|
How can I disable the control's splitter so the user can't resize the chart area
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->PutOnResizeControl(EXG2ANTTLib::exDisableSplitter);
spG2antt1->GetChart()->PutPaneWidth(VARIANT_TRUE,60);
|
856
|
How can I change the label for a specified unit

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutPaneWidth(VARIANT_FALSE,0);
var_Chart->PutLevelCount(2);
var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
var_Chart->PutAllowResizeInsideZoom(VARIANT_FALSE);
var_Chart->PutInsideZoomOnDblClick(VARIANT_FALSE);
var_Chart->GetDefaultInsideZoomFormat()->PutOwnerLabel(L"<b><%d%></b> <%d2%>");
EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms();
var_InsideZooms->PutSplitBaseLevel(VARIANT_FALSE);
var_InsideZooms->PutDefaultWidth(32);
var_InsideZooms->Add(COleDateTime(2008,1,4,0,00,00).operator DATE())->PutAllowInsideFormat(VARIANT_FALSE);
spG2antt1->EndUpdate();
|
855
|
How can I bold the inside units

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutPaneWidth(VARIANT_FALSE,0);
var_Chart->PutLevelCount(2);
var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
var_Chart->PutAllowResizeInsideZoom(VARIANT_FALSE);
var_Chart->PutInsideZoomOnDblClick(VARIANT_FALSE);
var_Chart->GetDefaultInsideZoomFormat()->PutInsideLabel(L"<b><%hh%></b>");
var_Chart->GetInsideZooms()->Add(COleDateTime(2008,1,4,0,00,00).operator DATE());
spG2antt1->EndUpdate();
|
854
|
How can I change the scale unit when doing inside zoom ( the chart displays weeks, and we want week days )

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutShowNonworkingDates(VARIANT_FALSE);
var_Chart->PutPaneWidth(VARIANT_FALSE,0);
var_Chart->PutLevelCount(2);
EXG2ANTTLib::ILevelPtr var_Level = var_Chart->GetLevel(0);
var_Level->PutLabel("<%mmmm%>");
var_Level->PutUnit(EXG2ANTTLib::exMonth);
EXG2ANTTLib::ILevelPtr var_Level1 = var_Chart->GetLevel(1);
var_Level1->PutLabel("<%ww%>");
var_Level1->PutUnit(EXG2ANTTLib::exWeek);
var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
EXG2ANTTLib::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->GetDefaultInsideZoomFormat();
var_InsideZoomFormat->PutOwnerLabel(L"<font ;7><%mmm%> Week: <%ww%>");
var_InsideZoomFormat->PutInsideLabel(L"<font ;7><b><%d1%></b>");
var_InsideZoomFormat->PutInsideUnit(EXG2ANTTLib::exDay);
EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms();
var_InsideZooms->PutSplitBaseLevel(VARIANT_FALSE);
var_InsideZooms->Add(COleDateTime(2008,2,3,0,00,00).operator DATE());
spG2antt1->EndUpdate();
|
853
|
How can I zoom or magnify the selected date to display the hours, from 8 to 8

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutPaneWidth(VARIANT_FALSE,0);
var_Chart->PutLevelCount(2);
var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
EXG2ANTTLib::IInsideZoomFormatPtr var_InsideZoomFormat = var_Chart->GetDefaultInsideZoomFormat();
var_InsideZoomFormat->PutInsideLabel(L"H: <b><%hh%></b>");
var_InsideZoomFormat->PutInsideUnit(EXG2ANTTLib::exHour);
var_InsideZoomFormat->PutInsideCount(8);
EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms();
var_InsideZooms->Add(COleDateTime(2008,1,4,0,00,00).operator DATE());
spG2antt1->EndUpdate();
|
852
|
How can I zoom or magnify the selected date to display the hours

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutPaneWidth(VARIANT_FALSE,0);
var_Chart->PutLevelCount(2);
var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms();
var_InsideZooms->Add(COleDateTime(2008,1,4,0,00,00).operator DATE());
spG2antt1->EndUpdate();
|
851
|
How can I change the foreground color for a time unit

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutLevelCount(2);
var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
var_Chart->PutAllowResizeInsideZoom(VARIANT_FALSE);
var_Chart->PutInsideZoomOnDblClick(VARIANT_FALSE);
var_Chart->GetDefaultInsideZoomFormat()->PutForeColor(RGB(255,0,0));
EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms();
var_InsideZooms->PutSplitBaseLevel(VARIANT_FALSE);
var_InsideZooms->PutDefaultWidth(18);
var_InsideZooms->Add(COleDateTime(2008,1,4,0,00,00).operator DATE())->PutAllowInsideFormat(VARIANT_FALSE);
spG2antt1->EndUpdate();
|
850
|
How can I change the background color for a time unit, in the chart area

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutLevelCount(2);
var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
var_Chart->PutAllowResizeInsideZoom(VARIANT_FALSE);
var_Chart->PutInsideZoomOnDblClick(VARIANT_FALSE);
var_Chart->GetDefaultInsideZoomFormat()->PutBackColorChart(RGB(255,0,0));
EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms();
var_InsideZooms->PutSplitBaseLevel(VARIANT_FALSE);
var_InsideZooms->PutDefaultWidth(18);
var_InsideZooms->Add(COleDateTime(2008,1,4,0,00,00).operator DATE())->PutAllowInsideFormat(VARIANT_FALSE);
spG2antt1->EndUpdate();
|
849
|
How can I change the background color for a time unit, using EBN files

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutLevelCount(2);
var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
var_Chart->PutAllowResizeInsideZoom(VARIANT_FALSE);
var_Chart->PutInsideZoomOnDblClick(VARIANT_FALSE);
var_Chart->GetDefaultInsideZoomFormat()->PutBackColor(0x1000000);
EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms();
var_InsideZooms->PutSplitBaseLevel(VARIANT_FALSE);
var_InsideZooms->PutDefaultWidth(18);
var_InsideZooms->Add(COleDateTime(2008,1,4,0,00,00).operator DATE())->PutAllowInsideFormat(VARIANT_FALSE);
spG2antt1->EndUpdate();
|
848
|
How can I change the background color for a time unit

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
EXG2ANTTLib::IChartPtr var_Chart = spG2antt1->GetChart();
var_Chart->PutLevelCount(2);
var_Chart->PutFirstVisibleDate(COleDateTime(2008,1,1,0,00,00).operator DATE());
var_Chart->PutAllowInsideZoom(VARIANT_TRUE);
var_Chart->PutAllowResizeInsideZoom(VARIANT_FALSE);
var_Chart->PutInsideZoomOnDblClick(VARIANT_FALSE);
var_Chart->GetDefaultInsideZoomFormat()->PutBackColor(RGB(255,0,0));
EXG2ANTTLib::IInsideZoomsPtr var_InsideZooms = var_Chart->GetInsideZooms();
var_InsideZooms->PutSplitBaseLevel(VARIANT_FALSE);
var_InsideZooms->PutDefaultWidth(18);
var_InsideZooms->Add(COleDateTime(2008,1,4,0,00,00).operator DATE())->PutAllowInsideFormat(VARIANT_FALSE);
spG2antt1->EndUpdate();
|
847
|
How can I display the column using currency format and enlarge the font for certain values
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Currency")));
var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
var_Column->PutFormatColumn(L"len(value) ? ((0:=dbl(value)) < 10 ? '<fgcolor=808080><font ;7>' : '<b>') + currency(=:0)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem("1.23");
var_Items->AddItem("2.34");
var_Items->AddItem("9.94");
var_Items->AddItem("11.94");
var_Items->AddItem("1000");
|
846
|
How can I highlight only parts of the cells
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"")));
var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
var_Column->PutFormatColumn(L"value replace 'hil' with '<fgcolor=FF0000><b>hil</b></fgcolor>'");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Root");
var_Items->InsertItem(h,vtMissing,"Child 1");
var_Items->InsertItem(h,vtMissing,"Child 2");
var_Items->InsertItem(h,vtMissing,"Child 3");
var_Items->PutExpandItem(h,VARIANT_TRUE);
|
845
|
How can I get the number of occurrences of a specified string in the cell
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"occurrences")));
var_Column->PutComputedField(L"lower(%0) count 'o'");
var_Column->PutFormatColumn(L"'contains ' + value + ' of \\'o\\' chars'");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Root");
var_Items->InsertItem(h,vtMissing,"Child 1 oooof the root");
var_Items->InsertItem(h,vtMissing,"Child 2");
var_Items->InsertItem(h,vtMissing,"Child 3");
var_Items->PutExpandItem(h,VARIANT_TRUE);
|
844
|
How can I display dates in my format
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Date")));
var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
var_Column->PutFormatColumn(L"'<b>' + year(0:=date(value)) + '</b><fgcolor=808080><font ;6> (' + month(=:0) + ' - ' + day(=:0) +')'");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem(COleDateTime(2001,1,21,0,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2002,2,22,0,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2003,3,13,0,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2004,4,24,0,00,00).operator DATE());
|
843
|
How can I display dates in short format
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Date")))->PutFormatColumn(L"shortdate(value)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2002,2,2,0,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2003,3,3,0,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2004,4,4,0,00,00).operator DATE());
|
842
|
How can I display dates in long format
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Date")))->PutFormatColumn(L"longdate(value)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem(COleDateTime(2001,1,1,0,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2002,2,2,0,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2003,3,3,0,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2004,4,4,0,00,00).operator DATE());
|
841
|
How can I display only the right part of the cell
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Right")));
var_Column->PutComputedField(L"%0 right 2");
var_Column->PutFormatColumn(L"'\"' + value + '\"'");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Root");
var_Items->InsertItem(h,vtMissing,"Child 1");
var_Items->InsertItem(h,vtMissing,"Child 2");
var_Items->InsertItem(h,vtMissing,"SChild 3");
var_Items->PutExpandItem(h,VARIANT_TRUE);
|
840
|
How can I display only the left part of the cell
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Left")))->PutComputedField(L"%0 left 2");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Root");
var_Items->InsertItem(h,vtMissing,"Child 1");
var_Items->InsertItem(h,vtMissing,"Child 2");
var_Items->InsertItem(h,vtMissing,"SChild 3");
var_Items->PutExpandItem(h,VARIANT_TRUE);
|
839
|
How can I display true or false instead 0 and -1
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Boolean")))->PutFormatColumn(L"value != 0 ? 'true' : 'false'");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem(VARIANT_TRUE);
var_Items->AddItem(VARIANT_FALSE);
var_Items->AddItem(VARIANT_TRUE);
var_Items->AddItem(long(0));
var_Items->AddItem(long(1));
|
838
|
Is there any option to print the columns section on each page

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
spG2antt1->GetChart()->PutLevelCount(2);
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h1 = var_Items->AddItem("Task 1");
var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
long h2 = var_Items->AddItem("Task 2");
var_Items->AddBar(h2,"Task",COleDateTime(2001,2,5,0,00,00).operator DATE(),COleDateTime(2001,2,7,0,00,00).operator DATE(),"K2",vtMissing);
var_Items->AddLink("L1",h1,"K1",h2,"K2");
var_Items->PutLink("L1",EXG2ANTTLib::exLinkStartPos,long(0));
spG2antt1->EndUpdate();
/*
Includes the definition for CreateObject function like follows:
#include <comdef.h>
IUnknownPtr CreateObject( BSTR Object )
{
IUnknownPtr spResult;
spResult.CreateInstance( Object );
return spResult;
};
*/
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXPRINTLib' for the library: 'ExPrint 1.0 Control Library'
#import <ExPrint.dll>
using namespace EXPRINTLib;
*/
EXPRINTLib::IExPrintPtr var_Print = ::CreateObject(L"Exontrol.Print");
var_Print->PutOptions("ColumnsOnEveryPage=1");
var_Print->PutPrintExt(((EXG2ANTTLib::IG2anttPtr)(spG2antt1)));
var_Print->Preview();
|
837
|
How do I print the control's content

/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->BeginUpdate();
spG2antt1->GetColumns()->Add(L"Task");
spG2antt1->GetChart()->PutFirstVisibleDate(COleDateTime(2001,1,1,0,00,00).operator DATE());
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h1 = var_Items->AddItem("Task 1");
var_Items->AddBar(h1,"Task",COleDateTime(2001,1,2,0,00,00).operator DATE(),COleDateTime(2001,1,4,0,00,00).operator DATE(),"K1",vtMissing);
long h2 = var_Items->AddItem("Task 2");
var_Items->AddBar(h2,"Task",COleDateTime(2001,1,5,0,00,00).operator DATE(),COleDateTime(2001,1,7,0,00,00).operator DATE(),"K2",vtMissing);
var_Items->AddLink("L1",h1,"K1",h2,"K2");
var_Items->PutLink("L1",EXG2ANTTLib::exLinkStartPos,long(0));
spG2antt1->EndUpdate();
/*
Includes the definition for CreateObject function like follows:
#include <comdef.h>
IUnknownPtr CreateObject( BSTR Object )
{
IUnknownPtr spResult;
spResult.CreateInstance( Object );
return spResult;
};
*/
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXPRINTLib' for the library: 'ExPrint 1.0 Control Library'
#import <ExPrint.dll>
using namespace EXPRINTLib;
*/
EXPRINTLib::IExPrintPtr var_Print = ::CreateObject(L"Exontrol.Print");
var_Print->PutPrintExt(((EXG2ANTTLib::IG2anttPtr)(spG2antt1)));
var_Print->Preview();
|
836
|
How can I display icons or images instead numbers
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->Images(_bstr_t("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTq") +
"lVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m" +
"0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/y" +
"NAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=");
EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Icons")));
var_Column->PutDef(EXG2ANTTLib::exCellValueFormat,long(1));
var_Column->PutFormatColumn(L"'The cell displays the icon <img>'+value+'</img> instead ' + value");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem(long(1));
var_Items->AddItem(long(2));
var_Items->AddItem(long(3));
|
835
|
How can I display the column using currency
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Currency")))->PutFormatColumn(L"currency(dbl(value))");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem("1.23");
var_Items->AddItem("2.34");
var_Items->AddItem("0");
var_Items->AddItem(long(5));
var_Items->AddItem("10000.99");
|
834
|
How can I display the currency only for not empty cells
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Number");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Currency")))->PutComputedField(L"len(%0) ? currency(dbl(%0)) : ''");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem("1.23");
var_Items->AddItem("2.34");
var_Items->AddItem("0");
var_Items->PutItemBackColor(var_Items->AddItem(vtMissing),RGB(255,128,128));
var_Items->AddItem("10000.99");
|
833
|
Is there a function to display the number of days between two date including the number of hours
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Start")))->PutWidth(32);
spG2antt1->GetColumns()->Add(L"End");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Duration")))->PutComputedField(_bstr_t("((1:=int(0:= (date(%1)-date(%0)))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)") +
"*24))) != 0 ? =:1 + ' hour(s) ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem(COleDateTime(2001,1,11,0,00,00).operator DATE());
var_Items->PutCellValue(h,long(1),COleDateTime(2001,1,14,0,00,00).operator DATE());
h = var_Items->AddItem(COleDateTime(2002,2,22,12,00,00).operator DATE());
var_Items->PutCellValue(h,long(1),COleDateTime(2002,3,14,13,00,00).operator DATE());
h = var_Items->AddItem(COleDateTime(2003,3,13,0,00,00).operator DATE());
var_Items->PutCellValue(h,long(1),COleDateTime(2003,4,11,11,00,00).operator DATE());
|
832
|
Is there a function to display the number of days between two date including the number of hours
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Start");
spG2antt1->GetColumns()->Add(L"End");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Duration")))->PutComputedField(L"\"D \" + int(date(%1)-date(%0)) + \" H \" + round(24*(date(%1)-date(%0) - floor(date(%1)-date(%0))))");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem(COleDateTime(2001,1,11,0,00,00).operator DATE());
var_Items->PutCellValue(h,long(1),COleDateTime(2001,1,14,23,00,00).operator DATE());
h = var_Items->AddItem(COleDateTime(2002,2,22,12,00,00).operator DATE());
var_Items->PutCellValue(h,long(1),COleDateTime(2002,3,14,13,00,00).operator DATE());
h = var_Items->AddItem(COleDateTime(2003,3,13,0,00,00).operator DATE());
var_Items->PutCellValue(h,long(1),COleDateTime(2003,4,11,11,00,00).operator DATE());
|
831
|
How can I display the number of days between two dates
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Start");
spG2antt1->GetColumns()->Add(L"End");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Duration")))->PutComputedField(L"(date(%1)-date(%0)) + ' days'");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem(COleDateTime(2001,1,11,0,00,00).operator DATE());
var_Items->PutCellValue(h,long(1),COleDateTime(2001,1,14,0,00,00).operator DATE());
h = var_Items->AddItem(COleDateTime(2002,2,22,0,00,00).operator DATE());
var_Items->PutCellValue(h,long(1),COleDateTime(2002,3,14,0,00,00).operator DATE());
h = var_Items->AddItem(COleDateTime(2003,3,13,0,00,00).operator DATE());
var_Items->PutCellValue(h,long(1),COleDateTime(2003,4,11,0,00,00).operator DATE());
|
830
|
How can I get second part of the date
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Date");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Second")))->PutComputedField(L"sec(date(%0))");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem(COleDateTime(2001,1,11,10,10,00).operator DATE());
var_Items->AddItem(COleDateTime(2002,2,22,11,01,22).operator DATE());
var_Items->AddItem(COleDateTime(2003,3,13,12,23,01).operator DATE());
var_Items->AddItem(COleDateTime(2004,4,14,13,11,59).operator DATE());
|
829
|
How can I get minute part of the date
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Date");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Minute")))->PutComputedField(L"min(date(%0))");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem(COleDateTime(2001,1,11,10,10,00).operator DATE());
var_Items->AddItem(COleDateTime(2002,2,22,11,01,00).operator DATE());
var_Items->AddItem(COleDateTime(2003,3,13,12,23,00).operator DATE());
var_Items->AddItem(COleDateTime(2004,4,14,13,11,00).operator DATE());
|
828
|
How can I check the hour part only so I know it was afternoon
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetConditionalFormats()->Add(L"hour(%0)>=12",vtMissing)->PutBold(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"Date");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Hour")))->PutComputedField(L"hour(%0)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem(COleDateTime(2001,1,11,10,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2002,2,22,11,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2003,3,13,12,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2004,4,14,13,00,00).operator DATE());
|
827
|
What about a function to get the day in the week, or days since Sunday
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Date");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"WeekDay")))->PutComputedField(L"weekday(%0)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem(COleDateTime(2001,1,11,10,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2002,2,22,11,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2003,3,13,12,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2004,4,14,13,00,00).operator DATE());
|
826
|
Is there any function to get the day of the year or number of days since January 1st
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Date");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Day since January 1st")))->PutComputedField(L"yearday(%0)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem(COleDateTime(2001,1,11,10,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2002,2,22,11,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2003,3,13,12,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2004,4,14,13,00,00).operator DATE());
|
825
|
How can I display only the day of the date
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Date");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Day")))->PutComputedField(L"day(%0)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem(COleDateTime(2001,1,11,10,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2002,2,22,11,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2003,3,13,12,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2004,4,14,13,00,00).operator DATE());
|
824
|
How can I display only the month of the date
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Date");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Month")))->PutComputedField(L"month(%0)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem(COleDateTime(2001,1,1,10,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2002,2,2,11,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2003,3,3,12,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2004,4,4,13,00,00).operator DATE());
|
823
|
How can I get only the year part from a date expression
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Date");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Year")))->PutComputedField(L"year(%0)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem(COleDateTime(2001,1,1,10,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2002,2,2,11,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2003,3,3,12,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2004,4,4,13,00,00).operator DATE());
|
822
|
Can I convert the expression to date
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Number");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Date")))->PutComputedField(L"date(dbl(%0))");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem("-1.98");
var_Items->AddItem("30000.99");
var_Items->AddItem("3561.23");
var_Items->AddItem("1232.34");
|
821
|
Can I convert the expression to a number, double or float
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Number");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Number + 2")))->PutComputedField(L"dbl(%0)+2");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem("-1.98");
var_Items->AddItem("0.99");
var_Items->AddItem("1.23");
var_Items->AddItem("2.34");
|
820
|
How can I display dates in long format
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Date");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"LongFormat")))->PutComputedField(L"longdate(%0)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem(COleDateTime(2001,1,1,10,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2002,2,2,11,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2003,3,3,12,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2004,4,4,13,00,00).operator DATE());
|
819
|
How can I display dates in short format
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Date");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"ShortFormat")))->PutComputedField(L"shortdate(%0)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem(COleDateTime(2001,1,1,10,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2002,2,2,11,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2003,3,3,12,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2004,4,4,13,00,00).operator DATE());
|
818
|
How can I display the time only of a date expression
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Date");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Time")))->PutComputedField(L"'time is:' + time(date(%0))");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem(COleDateTime(2001,1,1,10,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2002,2,2,11,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2003,3,3,12,00,00).operator DATE());
var_Items->AddItem(COleDateTime(2004,4,4,13,00,00).operator DATE());
|
817
|
Is there any function to display currencies, or money formatted as in the control panel
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Number");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Currency")))->PutComputedField(L"currency(dbl(%0))");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem(double(1.23));
var_Items->AddItem(double(2.34));
var_Items->AddItem(double(10000.99));
|
816
|
How can I convert the expression to a string so I can look into the date string expression for month's name
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Number");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Str")))->PutComputedField(L"str(%0) + ' AA'");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem("-1.98");
var_Items->AddItem("0.99");
var_Items->AddItem("1.23");
var_Items->AddItem("2.34");
|
815
|
Can I display the absolute value or positive part of the number
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Number");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Abs")))->PutComputedField(L"abs(%0)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem("-1.98");
var_Items->AddItem("0.99");
var_Items->AddItem("1.23");
var_Items->AddItem("2.34");
|
814
|
Is there any function to get largest number with no fraction part that is not greater than the value
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Number");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Floor")))->PutComputedField(L"floor(%0)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem("-1.98");
var_Items->AddItem("0.99");
var_Items->AddItem("1.23");
var_Items->AddItem("2.34");
|
813
|
Is there any function to round the values base on the .5 value
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Number");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Round")))->PutComputedField(L"round(%0)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem("-1.98");
var_Items->AddItem("0.99");
var_Items->AddItem("1.23");
var_Items->AddItem("2.34");
|
812
|
How can I get or display the integer part of the cell
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetColumns()->Add(L"Number");
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Int")))->PutComputedField(L"int(%0)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
var_Items->AddItem("-1.98");
var_Items->AddItem("0.99");
var_Items->AddItem("1.23");
var_Items->AddItem("2.34");
|
811
|
How can I display names as proper ( first leter of the word must be in uppercase, and the rest in lowercase )
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"")))->PutFormatColumn(L"proper(%0)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("root");
var_Items->InsertItem(h,vtMissing,"child child");
var_Items->InsertItem(h,vtMissing,"child child");
var_Items->InsertItem(h,vtMissing,"child child");
var_Items->PutExpandItem(h,VARIANT_TRUE);
|
810
|
Is there any option to display cells in uppercase
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"")))->PutFormatColumn(L"upper(%0)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Root");
var_Items->InsertItem(h,vtMissing,"Child 1");
var_Items->InsertItem(h,vtMissing,"Child 2");
var_Items->InsertItem(h,vtMissing,"Chld 3");
var_Items->PutExpandItem(h,VARIANT_TRUE);
|
809
|
Is there any option to display cells in lowercase
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"")))->PutFormatColumn(L"lower(%0)");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Root");
var_Items->InsertItem(h,vtMissing,"Child 1");
var_Items->InsertItem(h,vtMissing,"Child 2");
var_Items->InsertItem(h,vtMissing,"Chld 3");
var_Items->PutExpandItem(h,VARIANT_TRUE);
|
808
|
How can I mark the cells that has a specified type, ie strings only
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetConditionalFormats()->Add(L"type(%0) = 8",vtMissing)->PutForeColor(RGB(255,0,0));
spG2antt1->GetColumns()->Add(L"");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Root");
var_Items->InsertItem(h,vtMissing,"Child 1");
var_Items->InsertItem(h,vtMissing,long(2));
var_Items->InsertItem(h,vtMissing,"Chld 3");
var_Items->PutExpandItem(h,VARIANT_TRUE);
|
807
|
How can I bold the items that contains data or those who displays empty strings
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetConditionalFormats()->Add(L"not len(%1)=0",vtMissing)->PutBold(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"C1");
spG2antt1->GetColumns()->Add(L"C2");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Root");
var_Items->InsertItem(h,vtMissing,"Child 1");
long hC = var_Items->InsertItem(h,vtMissing,"Child 2");
var_Items->PutCellValue(hC,long(1),"1");
var_Items->InsertItem(h,vtMissing,"Child 3");
var_Items->PutExpandItem(h,VARIANT_TRUE);
|
806
|
Can I change the background color for items or cells that contains a specified string
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetConditionalFormats()->Add(L"%0 contains 'hi'",vtMissing)->PutBackColor(RGB(255,0,0));
spG2antt1->GetColumns()->Add(L"");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Root");
var_Items->InsertItem(h,vtMissing,"Child 1");
var_Items->InsertItem(h,vtMissing,"Child 2");
var_Items->InsertItem(h,vtMissing,"Chld 3");
var_Items->PutExpandItem(h,VARIANT_TRUE);
|
805
|
Is there any option to change the fore color for cells or items that ends with a specified string
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetConditionalFormats()->Add(L"%0 endwith '22'",vtMissing)->PutForeColor(RGB(255,0,0));
spG2antt1->GetColumns()->Add(L"");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Root");
var_Items->InsertItem(h,vtMissing,"Child 1");
var_Items->InsertItem(h,vtMissing,"Child 1.22");
var_Items->InsertItem(h,vtMissing,"Child 2.22");
var_Items->PutExpandItem(h,VARIANT_TRUE);
|
804
|
How can I highlight the cells or items that starts with a specified string
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetConditionalFormats()->Add(L"%0 startwith 'C'",vtMissing)->PutUnderline(VARIANT_TRUE);
spG2antt1->GetColumns()->Add(L"");
EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems();
long h = var_Items->AddItem("Root");
var_Items->InsertItem(h,vtMissing,"Child 1");
var_Items->InsertItem(h,vtMissing,"Child 2");
var_Items->InsertItem(h,vtMissing,"SChild 3");
var_Items->PutExpandItem(h,VARIANT_TRUE);
|
803
|
How can I change the background color or the visual appearance using ebn for a particular column
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
spG2antt1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn");
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
var_Columns->Add(L"Column 1");
((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column 2")))->PutDef(EXG2ANTTLib::exHeaderBackColor,long(16777216));
((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column 3")))->PutDef(EXG2ANTTLib::exHeaderBackColor,long(16777471));
var_Columns->Add(L"Column 4");
|
802
|
How can I change the foreground color for a particular column
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
var_Columns->Add(L"Column 1");
((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column 2")))->PutDef(EXG2ANTTLib::exHeaderForeColor,long(8439039));
var_Columns->Add(L"Column 3");
|
801
|
How can I change the background color for a particular column
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library'
#import <ExG2antt.dll>
using namespace EXG2ANTTLib;
*/
EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown();
EXG2ANTTLib::IColumnsPtr var_Columns = spG2antt1->GetColumns();
var_Columns->Add(L"Column 1");
((EXG2ANTTLib::IColumnPtr)(var_Columns->Add(L"Column 2")))->PutDef(EXG2ANTTLib::exHeaderBackColor,long(8439039));
var_Columns->Add(L"Column 3");
|